<?php
$tdatacolors=array();
	$tdatacolors[".NumberOfChars"]=80; 
	$tdatacolors[".ShortName"]="colors";
	$tdatacolors[".OwnerID"]="";
	$tdatacolors[".OriginalTable"]="colors";


	
//	field labels
$fieldLabelscolors = array();
if(mlang_getcurrentlang()=="English")
{
	$fieldLabelscolors["English"]=array();
	$fieldToolTipscolors["English"]=array();
	$fieldLabelscolors["English"]["id"] = "Id";
	$fieldToolTipscolors["English"]["id"] = "";
	$fieldLabelscolors["English"]["color_code"] = "Color Code";
	$fieldToolTipscolors["English"]["color_code"] = "";
	$fieldLabelscolors["English"]["color_name"] = "Color Name";
	$fieldToolTipscolors["English"]["color_name"] = "";
	$fieldLabelscolors["English"][""] = "";
	$fieldToolTipscolors["English"][""] = "";
	$fieldLabelscolors["English"][""] = "";
	$fieldToolTipscolors["English"][""] = "";
	if (count($fieldToolTipscolors["English"])){
		$tdatacolors[".isUseToolTips"]=true;
	}
}
if(mlang_getcurrentlang()=="Chinese (Hong Kong S.A.R.)")
{
	$fieldLabelscolors["Chinese (Hong Kong S.A.R.)"]=array();
	$fieldToolTipscolors["Chinese (Hong Kong S.A.R.)"]=array();
	$fieldLabelscolors["Chinese (Hong Kong S.A.R.)"]["id"] = "Id";
	$fieldToolTipscolors["Chinese (Hong Kong S.A.R.)"]["id"] = "";
	$fieldLabelscolors["Chinese (Hong Kong S.A.R.)"]["color_code"] = "Color Code";
	$fieldToolTipscolors["Chinese (Hong Kong S.A.R.)"]["color_code"] = "";
	$fieldLabelscolors["Chinese (Hong Kong S.A.R.)"]["color_name"] = "Color Name";
	$fieldToolTipscolors["Chinese (Hong Kong S.A.R.)"]["color_name"] = "";
	$fieldLabelscolors["Chinese (Hong Kong S.A.R.)"][""] = "";
	$fieldToolTipscolors["Chinese (Hong Kong S.A.R.)"][""] = "";
	$fieldLabelscolors["Chinese (Hong Kong S.A.R.)"][""] = "";
	$fieldToolTipscolors["Chinese (Hong Kong S.A.R.)"][""] = "";
	if (count($fieldToolTipscolors["Chinese (Hong Kong S.A.R.)"])){
		$tdatacolors[".isUseToolTips"]=true;
	}
}
if(mlang_getcurrentlang()=="Chinese (Taiwan)")
{
	$fieldLabelscolors["Chinese (Taiwan)"]=array();
	$fieldToolTipscolors["Chinese (Taiwan)"]=array();
	$fieldLabelscolors["Chinese (Taiwan)"]["id"] = "Id";
	$fieldToolTipscolors["Chinese (Taiwan)"]["id"] = "";
	$fieldLabelscolors["Chinese (Taiwan)"]["color_code"] = "Color Code";
	$fieldToolTipscolors["Chinese (Taiwan)"]["color_code"] = "";
	$fieldLabelscolors["Chinese (Taiwan)"]["color_name"] = "Color Name";
	$fieldToolTipscolors["Chinese (Taiwan)"]["color_name"] = "";
	$fieldLabelscolors["Chinese (Taiwan)"][""] = "";
	$fieldToolTipscolors["Chinese (Taiwan)"][""] = "";
	$fieldLabelscolors["Chinese (Taiwan)"][""] = "";
	$fieldToolTipscolors["Chinese (Taiwan)"][""] = "";
	if (count($fieldToolTipscolors["Chinese (Taiwan)"])){
		$tdatacolors[".isUseToolTips"]=true;
	}
}
if(mlang_getcurrentlang()=="French")
{
	$fieldLabelscolors["French"]=array();
	$fieldToolTipscolors["French"]=array();
	if (count($fieldToolTipscolors["French"])){
		$tdatacolors[".isUseToolTips"]=true;
	}
}


	
	$tdatacolors[".NCSearch"]=true;

	

$tdatacolors[".shortTableName"] = "colors";
$tdatacolors[".nSecOptions"] = 0;
$tdatacolors[".recsPerRowList"] = 1;	
$tdatacolors[".tableGroupBy"] = "0";
$tdatacolors[".mainTableOwnerID"] = "";
$tdatacolors[".moveNext"] = 1;




$tdatacolors[".showAddInPopup"] = false;

$tdatacolors[".showEditInPopup"] = false;

$tdatacolors[".showViewInPopup"] = false;


$tdatacolors[".fieldsForRegister"] = array();

$tdatacolors[".listAjax"] = true;

	$tdatacolors[".audit"] = false;

	$tdatacolors[".locking"] = false;
	
$tdatacolors[".listIcons"] = true;
$tdatacolors[".edit"] = true;
$tdatacolors[".inlineEdit"] = true;
$tdatacolors[".view"] = true;

$tdatacolors[".exportTo"] = true;

$tdatacolors[".printFriendly"] = true;

$tdatacolors[".delete"] = true;

$tdatacolors[".showSimpleSearchOptions"] = true;

$tdatacolors[".showSearchPanel"] = true;


$tdatacolors[".isUseAjaxSuggest"] = true;

$tdatacolors[".rowHighlite"] = true;


// button handlers file names

$tdatacolors[".addPageEvents"] = false;

$tdatacolors[".arrKeyFields"][] = "id";

// use datepicker for search panel
$tdatacolors[".isUseCalendarForSearch"] = false;

// use timepicker for search panel
$tdatacolors[".isUseTimeForSearch"] = false;

$tdatacolors[".isUseiBox"] = false;



$tdatacolors[".isUseInlineAdd"] = true;

$tdatacolors[".isUseInlineEdit"] = true;
$tdatacolors[".isUseInlineJs"] = $tdatacolors[".isUseInlineAdd"] || $tdatacolors[".isUseInlineEdit"];

$tdatacolors[".allSearchFields"] = array();

$tdatacolors[".globSearchFields"][] = "id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("id", $tdatacolors[".allSearchFields"]))
{
	$tdatacolors[".allSearchFields"][] = "id";	
}
$tdatacolors[".globSearchFields"][] = "color_code";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("color_code", $tdatacolors[".allSearchFields"]))
{
	$tdatacolors[".allSearchFields"][] = "color_code";	
}
$tdatacolors[".globSearchFields"][] = "color_name";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("color_name", $tdatacolors[".allSearchFields"]))
{
	$tdatacolors[".allSearchFields"][] = "color_name";	
}


$tdatacolors[".googleLikeFields"][] = "id";
$tdatacolors[".googleLikeFields"][] = "color_code";
$tdatacolors[".googleLikeFields"][] = "color_name";



$tdatacolors[".advSearchFields"][] = "id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("id", $tdatacolors[".allSearchFields"])) 
{
	$tdatacolors[".allSearchFields"][] = "id";	
}
$tdatacolors[".advSearchFields"][] = "color_code";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("color_code", $tdatacolors[".allSearchFields"])) 
{
	$tdatacolors[".allSearchFields"][] = "color_code";	
}
$tdatacolors[".advSearchFields"][] = "color_name";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("color_name", $tdatacolors[".allSearchFields"])) 
{
	$tdatacolors[".allSearchFields"][] = "color_name";	
}

$tdatacolors[".isTableType"] = "list";


	

$tdatacolors[".isDisplayLoading"] = true;

$tdatacolors[".isResizeColumns"] = false;





$tdatacolors[".pageSize"] = 20;

$gstrOrderBy = "";
if(strlen($gstrOrderBy) && strtolower(substr($gstrOrderBy,0,8))!="order by")
	$gstrOrderBy = "order by ".$gstrOrderBy;
$tdatacolors[".strOrderBy"] = $gstrOrderBy;
	
$tdatacolors[".orderindexes"] = array();

$tdatacolors[".sqlHead"] = "SELECT id,   color_code,   color_name";
$tdatacolors[".sqlFrom"] = "FROM colors";
$tdatacolors[".sqlWhereExpr"] = "";
$tdatacolors[".sqlTail"] = "";




//fill array of records per page for list and report without group fields
$arrRPP = array();
$arrRPP[] = 10;
$arrRPP[] = 20;
$arrRPP[] = 30;
$arrRPP[] = 50;
$arrRPP[] = 100;
$arrRPP[] = 500;
$arrRPP[] = -1;
$tdatacolors[".arrRecsPerPage"] = $arrRPP;

//fill array of groups per page for report with group fields
$arrGPP = array();
$arrGPP[] = 1;
$arrGPP[] = 3;
$arrGPP[] = 5;
$arrGPP[] = 10;
$arrGPP[] = 50;
$arrGPP[] = 100;
$arrGPP[] = -1;
$tdatacolors[".arrGroupsPerPage"] = $arrGPP;

	$tableKeys = array();
	$tableKeys[] = "id";
	$tdatacolors[".Keys"] = $tableKeys;

//	id
	$fdata = array();
	$fdata["strName"] = "id";
	$fdata["ownerTable"] = "colors";
		$fdata["Label"]="Id"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		$fdata["AutoInc"]=true;
	
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "id";
	
		$fdata["FullName"]= "id";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 1;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		
		
		
		
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacolors["id"]=$fdata;
//	color_code
	$fdata = array();
	$fdata["strName"] = "color_code";
	$fdata["ownerTable"] = "colors";
		$fdata["Label"]="Color Code"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "color_code";
	
		$fdata["FullName"]= "color_code";
	
		
		
		
		
		
				$fdata["Index"]= 2;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=50";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacolors["color_code"]=$fdata;
//	color_name
	$fdata = array();
	$fdata["strName"] = "color_name";
	$fdata["ownerTable"] = "colors";
		$fdata["Label"]="Color Name"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "color_name";
	
		$fdata["FullName"]= "color_name";
	
		
		
		
		
		
				$fdata["Index"]= 3;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=255";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacolors["color_name"]=$fdata;

	
$tables_data["colors"]=&$tdatacolors;
$field_labels["colors"] = &$fieldLabelscolors;
$fieldToolTips["colors"] = &$fieldToolTipscolors;

// -----------------start  prepare master-details data arrays ------------------------------//
// tables which are detail tables for current table (master)
$detailsTablesData["colors"] = array();

	
// tables which are master tables for current table (detail)
$masterTablesData["colors"] = array();

// -----------------end  prepare master-details data arrays ------------------------------//

require_once(getabspath("classes/sql.php"));










$proto312=array();
$proto312["m_strHead"] = "SELECT";
$proto312["m_strFieldList"] = "id,   color_code,   color_name";
$proto312["m_strFrom"] = "FROM colors";
$proto312["m_strWhere"] = "";
$proto312["m_strOrderBy"] = "";
$proto312["m_strTail"] = "";
$proto313=array();
$proto313["m_sql"] = "";
$proto313["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto313["m_column"]=$obj;
$proto313["m_contained"] = array();
$proto313["m_strCase"] = "";
$proto313["m_havingmode"] = "0";
$proto313["m_inBrackets"] = "0";
$proto313["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto313);

$proto312["m_where"] = $obj;
$proto315=array();
$proto315["m_sql"] = "";
$proto315["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto315["m_column"]=$obj;
$proto315["m_contained"] = array();
$proto315["m_strCase"] = "";
$proto315["m_havingmode"] = "0";
$proto315["m_inBrackets"] = "0";
$proto315["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto315);

$proto312["m_having"] = $obj;
$proto312["m_fieldlist"] = array();
						$proto317=array();
			$obj = new SQLField(array(
	"m_strName" => "id",
	"m_strTable" => "colors"
));

$proto317["m_expr"]=$obj;
$proto317["m_alias"] = "";
$obj = new SQLFieldListItem($proto317);

$proto312["m_fieldlist"][]=$obj;
						$proto319=array();
			$obj = new SQLField(array(
	"m_strName" => "color_code",
	"m_strTable" => "colors"
));

$proto319["m_expr"]=$obj;
$proto319["m_alias"] = "";
$obj = new SQLFieldListItem($proto319);

$proto312["m_fieldlist"][]=$obj;
						$proto321=array();
			$obj = new SQLField(array(
	"m_strName" => "color_name",
	"m_strTable" => "colors"
));

$proto321["m_expr"]=$obj;
$proto321["m_alias"] = "";
$obj = new SQLFieldListItem($proto321);

$proto312["m_fieldlist"][]=$obj;
$proto312["m_fromlist"] = array();
												$proto323=array();
$proto323["m_link"] = "SQLL_MAIN";
			$proto324=array();
$proto324["m_strName"] = "colors";
$proto324["m_columns"] = array();
$proto324["m_columns"][] = "id";
$proto324["m_columns"][] = "color_code";
$proto324["m_columns"][] = "color_name";
$obj = new SQLTable($proto324);

$proto323["m_table"] = $obj;
$proto323["m_alias"] = "";
$proto325=array();
$proto325["m_sql"] = "";
$proto325["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto325["m_column"]=$obj;
$proto325["m_contained"] = array();
$proto325["m_strCase"] = "";
$proto325["m_havingmode"] = "0";
$proto325["m_inBrackets"] = "0";
$proto325["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto325);

$proto323["m_joinon"] = $obj;
$obj = new SQLFromListItem($proto323);

$proto312["m_fromlist"][]=$obj;
$proto312["m_groupby"] = array();
$proto312["m_orderby"] = array();
$obj = new SQLQuery($proto312);

$queryData_colors = $obj;
$tdatacolors[".sqlquery"] = $queryData_colors;

$tableEvents["colors"] = new eventsBase;

?>
